<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Generator" content="Asbru Web Content Editor">
<meta http-equiv="Copyright" content="(C) 2002-2006 - Asbru Ltd. - www.asbrusoft.com">
<script type="text/javascript" src="webeditor.properties.js"></script>
<title>Asbru Web Content Editor</title>
<link rel="stylesheet" href="../dtree.css" type="text/css">
<script type="text/javascript" src="../dtree.js"></script>
<link rel="stylesheet" type="text/css" href="../hardcore.css"> 
<link rel="stylesheet" type="text/css" href="webeditor.css">
<script type="text/javascript">

document.title = HtmlDecode(Text('hyperlinkuploader_title'));

function requestParameter(name) {
	var value = "";
	if (start = request.indexOf("?"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	} else if (start = request.indexOf("&"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	}
	if (value.indexOf("&")+1) {
		value = value.substring(0, value.indexOf("&"));
	}
	value = unescape(value);
	return value;
}

var request = "" + window.location;
editor = requestParameter("editor");
request_action = requestParameter("action");
request_section  = requestParameter("section");
request_category = requestParameter("category");
request_id = requestParameter("id");
request_title = requestParameter("title");
request_href = requestParameter("href");

function checkExtension(file){
	if (file == "") { return false; }

	var file_extension = file;
	file_extension = file_extension.split(".");
	file_extension = file_extension[file_extension.length - 1];
	file_extension = file_extension.toLowerCase();

	valid_extensions = "";
	if (request_section == "Images") {
	valid_extensions = "gif,jpg,jpeg,png,swf,class";
	} else if (request_section = "Files") {
	valid_extensions = "txt,pdf,doc,zip";
	}
	if (valid_extensions != "") {
		valid_extension = valid_extensions.split(",");
		for (i=0; i<valid_extension.length; i++) {
			if ( file_extension == valid_extension[i]) return true;
		}
		alert(HtmlDecode(Text('hyperlinkuploader_error')) + ' ' + valid_extensions);
	} else {
		alert(HtmlDecode(Text('disabled')));
	}
	return false;
}

function getname(id, file, title, href){
	if (document.upload.title.value == "") {
		var file_name = file;
		file_name = file_name.split("/");
		file_name = file_name[file_name.length - 1];
		file_name = file_name.split("\\");
		file_name = file_name[file_name.length - 1];
		document.upload.title.value = file_name;
		title = file_name;
	}
	var title_extension = document.upload.title.value;
	title_extension = title_extension.split(".");
	if (title_extension.length == 1) {
		var f